#include "HitAnimation.h"
#include "globalVariables.h"

HitAnimation::HitAnimation(int x, int y)
{
	this->x = x;
	this->y = y;
}

void HitAnimation::run()
{
	counter++;
	if (counter >= 10)
	{
		isToDestroy = true;
	}
}

void HitAnimation::render(SDL_Renderer* renderer)
{
	SDL_Rect hitRect = { x, y, 50, 50 };
	SDL_RenderCopy(renderer, hitTexture, NULL, &hitRect);
}